<?php
/**################################################################################################**   
# Copyright (c)  2008  Carlos Galindo.   
# Permission is granted to copy, distribute and/or modify this document   
# under the terms of the GNU Free Documentation License, Version 1.2   
# or any later version published by the Free Software Foundation;   
# Provided 'as is' with no warranties, nor shall the autor be responsible for any mis-use of the same.     
# A copy of the license is included in the section entitled 'GNU Free Documentation License'.   
#   
#   CJAX FRAMEWORK 3.0.0RC2                $     
#   ajax made easy with cjax                    
#   -- DO NOT REMOVE THIS --                    
#   -- AUTHOR COPYRIGHT MUST REMAIN INTACT -   
#   CJAX FRAMEWORK  3.0.0RC2               $     
#   Written by: Carlos Galindo                  
#   Website: www.cjax.net                     $      
#   Email: cjxxi@msn.com    
#   Date: 2/12/2007                           $     
#   File Last Changed:  03/24/2009            $     
**####################################################################################################*/   

//this file is loaded on top of every controller and plugins
//[optional]include here any other depedent files that needs to be used by controller or application
//for example if you want to load a file form database connection etc..
//preferibly you would use 
//require_once dirname(dirname(__file__)).'/filename.php'; 
// dirname(dirname(__file__)) will return the absolute path to the parent directory.
// it is the recommended way to include any files whithin this file. to avoid any directory scope problems.


//get an instance of the CJAX object
$CJAX = CJAX::getInstance();
//if the controllers are being loaded from a different sub directory then 
//here is where you specify that directory.
//for example if  you had another controller directory for a different application
//the you would spacify the sub directory eg.  "admin" it would look for the
//controllers directory under  admin/controllers
// eg. sub directory name
$CJAX->controller_dir = '';
//you can also speficy the controller parent dir in the url 
//example :  ajax.php?controller=your_controller&section=your_function&load_controller=controller_dir
if($CJAX->get('load_controller')) {
	$CJAX->controller_dir = $CJAX->get('load_controller');
}
